import { defHttp } from '/@/utils/http/axios';

const TmUserApi = {
  GetPage: `/tmUser/queryTmUserList.html?queryData.userType=40521003`,
  Update: `/tmUser/updateTmUser.html`,
  Save: `/tmUser/createTmUser.html`,
  DeleteByIds: `/tmUser/deleteTmUser.html`,
};

export const getPage = (params) => defHttp.post({ url: TmUserApi.GetPage, params });
export const saveOrUpdate = (params, isUpdate: boolean) => {
  return isUpdate
    ? defHttp.post({ url: TmUserApi.Update, params })
    : defHttp.post({ url: TmUserApi.Save, params });
};
export const deleteByIds = (params, handleSuccess) =>
  defHttp.post({ url: TmUserApi.DeleteByIds, params }, { joinParamsToUrl: false }).then(() => {
    handleSuccess();
  });
